package com.newgrand.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.newgrand.domain.dbo.UIPCommon;
import com.newgrand.model.Fg3Supplyfile;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Author: zhanglixin
 * @Data: 2023/5/2 9:59
 * @Description: TODO
 */
@Resource
@Mapper
public interface Fg3SupplyfileMapper extends BaseMapper<Fg3Supplyfile> {

    @Select("select fs.phid,fs.ent_id as \"ent_id\",fs.org_id as \"org_id\",fs.accstop as \"accstop\" from fg3_supplyfile fs where fs.ent_id in (\n" +
            "select phid from fg3_enterprise where unisocialcredit in (\n" +
            " select unisocialcredit from fg3_enterprise where nvl(unisocialcredit,'0')<>'0' group by unisocialcredit having count(*)>1\n" +
            ")\n" +
            ")order by fs.ent_id ")
    List<Map<String,Object>> getFg3Supplyfile();
}
